package core.collection.mycollection;

import core.collection.bean.Student;

/**
 * 对象数组的使用
 *
 * 1、toString方式查看在对象数组中存储的对象，否则查看的是引用值
 * 2、学生案例的内存画图演示
 *
 * @author
 * @create 2018-12-22 15:09
 **/
public class mycollection_1_Collection_ObjectArray {

    public static void main(String[] args){
        Student[] arr = new Student[5];
        arr[0] = new Student("张三",21);
        arr[1] = new Student("李四",22);
        arr[2] = new Student("王五",23);
        for(Student str:arr){
            System.out.println(str);
        }
    }
}
